<template>
    <div class="app-header">
      <span class="span-one"><img src="../assets/prev.png" alt="" class="prev" @click="come"></span>
      <span class="span-two"><slot></slot></span>
    </div>
</template>

<script>
import 'lib-flexible';
    export default {
        name: "appHeader",
        data() {
          return {
          };
        },
      methods: {
        come(){
          this.$router.go(-1);
        }
      }
    }
</script>

<style scoped>
  *{
    margin: 0;
    padding: 0;
  }
  .app-header{
    width: 100vw;
    height: 60px;
    line-height: 60px;
    background-color: white;
    position: relative;
    display: block;
    top: 20px;
  }
  .span-one{
    position: absolute;
    left: .4rem;
    top: .1rem;
  }
  .span-two{
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: .4rem;
    color: rgba(0,0,0,.8);
  }
  .prev{
    width: .5rem;
    height: .5rem;
  }
</style>
